From a4ae2783362a79fd9f541a0f45c41de8757aa66e Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 4 Jan 2022 13:36:18 +0100 Subject: refactor: avoid mutated array with reverse method --- src/pages/thematique/[slug].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pages/thematique/[slug].tsx') diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 51506e5..74c2212 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -14,7 +14,7 @@ import { const Thematic: NextPageWithLayout = ({ thematic }) => { const getPostsList = () => { - return thematic.posts.reverse().map((post) => ( + return [...thematic.posts].reverse().map((post) => (
  • -- cgit v1.2.3